package com.hzlx;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * MES 物料交易，记录物料入库、出库等交易全流程信息对象 mes_material_transactions
 * 
 * @author ruoyi
 * @date 2025-07-01
 */
public class MesMaterialTransactionsDto
{
    private static final long serialVersionUID = 1L;

    /** 交易记录ID，自增唯一标识每条物料交易 */
    private Long transactionId;

    /** 批次ID，关联物料批次表 mes_material_batches */
    @Excel(name = "批次ID，关联物料批次表 mes_material_batches")
    private String batchId;

    /** 物料ID，关联物料主表 mes_materials */
    @Excel(name = "物料ID，关联物料主表 mes_materials")
    private Integer materialId;

    /** 交易类型，如入库、出库、领用等业务类型 */
    @Excel(name = "交易类型，如入库、出库、领用等业务类型")
    private String transactionType;

    /** 交易数量，本次物料交易的数量 */
    @Excel(name = "交易数量，本次物料交易的数量")
    private BigDecimal quantity;

    /** 计量单位，与交易数量配套，如个、千克 */
    @Excel(name = "计量单位，与交易数量配套，如个、千克")
    private String unitOfMeasure;

    /** 交易时间，默认当前时间，记录交易发生时刻 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "交易时间，默认当前时间，记录交易发生时刻", width = 30, dateFormat = "yyyy-MM-dd")
    private Date transactionTime;

    /** 关联工单ID，可选，关联本次交易相关的工单 */
    @Excel(name = "关联工单ID，可选，关联本次交易相关的工单")
    private String relatedWorkOrderId;

    /** 关联操作记录ID，可选，关联操作记录 */
    @Excel(name = "关联操作记录ID，可选，关联操作记录")
    private Long relatedOperationRecordId;

    /** 责任人ID，可选，记录负责本次交易的用户 */
    @Excel(name = "责任人ID，可选，记录负责本次交易的用户")
    private Integer responsibleUserId;

    /** 备注信息，可存交易相关说明、异常备注等 */
    @Excel(name = "备注信息，可存交易相关说明、异常备注等")
    private String notes;

    /** 创建时间，记录本条交易记录的创建时刻 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间，记录本条交易记录的创建时刻", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setTransactionId(Long transactionId) 
    {
        this.transactionId = transactionId;
    }

    public Long getTransactionId() 
    {
        return transactionId;
    }

    public void setBatchId(String batchId) 
    {
        this.batchId = batchId;
    }

    public String getBatchId() 
    {
        return batchId;
    }

    public Integer getMaterialId() {
        return materialId;
    }

    public void setMaterialId(Integer materialId) {
        this.materialId = materialId;
    }

    public void setTransactionType(String transactionType)
    {
        this.transactionType = transactionType;
    }

    public String getTransactionType() 
    {
        return transactionType;
    }

    public void setQuantity(BigDecimal quantity) 
    {
        this.quantity = quantity;
    }

    public BigDecimal getQuantity() 
    {
        return quantity;
    }

    public void setUnitOfMeasure(String unitOfMeasure) 
    {
        this.unitOfMeasure = unitOfMeasure;
    }

    public String getUnitOfMeasure() 
    {
        return unitOfMeasure;
    }

    public void setTransactionTime(Date transactionTime) 
    {
        this.transactionTime = transactionTime;
    }

    public Date getTransactionTime() 
    {
        return transactionTime;
    }

    public void setRelatedWorkOrderId(String relatedWorkOrderId) 
    {
        this.relatedWorkOrderId = relatedWorkOrderId;
    }

    public String getRelatedWorkOrderId() 
    {
        return relatedWorkOrderId;
    }

    public void setRelatedOperationRecordId(Long relatedOperationRecordId) 
    {
        this.relatedOperationRecordId = relatedOperationRecordId;
    }

    public Long getRelatedOperationRecordId() 
    {
        return relatedOperationRecordId;
    }

    public Integer getResponsibleUserId() {
        return responsibleUserId;
    }

    public void setResponsibleUserId(Integer responsibleUserId) {
        this.responsibleUserId = responsibleUserId;
    }

    public void setNotes(String notes)
    {
        this.notes = notes;
    }

    public String getNotes() 
    {
        return notes;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("transactionId", getTransactionId())
            .append("batchId", getBatchId())
            .append("materialId", getMaterialId())
            .append("transactionType", getTransactionType())
            .append("quantity", getQuantity())
            .append("unitOfMeasure", getUnitOfMeasure())
            .append("transactionTime", getTransactionTime())
            .append("relatedWorkOrderId", getRelatedWorkOrderId())
            .append("relatedOperationRecordId", getRelatedOperationRecordId())
            .append("responsibleUserId", getResponsibleUserId())
            .append("notes", getNotes())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
